{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "714615fd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "账号DIO\n",
      "密码123456\n",
      "DIO\n",
      "123456\n"
     ]
    }
   ],
   "source": [
    "username = input(\"账号\")\n",
    "password = input(\"密码\")\n",
    "\n",
    "print(username)\n",
    "print(password)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "2ddd7edb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'DIO'"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "username"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "73f59f56",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "账号：DIO\n",
      "密码：789456\n",
      "欢迎登录！\n"
     ]
    }
   ],
   "source": [
    "userl = \"DIO\"\n",
    "password = \"123456\"\n",
    "\n",
    "username = input(\"账号：\")\n",
    "password = input(\"密码：\")\n",
    " \n",
    "if userl == username and password == password:\n",
    "    print(\"欢迎\"+\"登录！\")\n",
    "else:\n",
    "    print(\"账号不存在或者密码不正确\")\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "ffa08167",
   "metadata": {},
   "outputs": [
    {
     "ename": "IndentationError",
     "evalue": "expected an indented block (<ipython-input-23-597d6764f5bd>, line 6)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-23-597d6764f5bd>\"\u001b[1;36m, line \u001b[1;32m6\u001b[0m\n\u001b[1;33m    username = input(\"账号:\")\u001b[0m\n\u001b[1;37m    ^\u001b[0m\n\u001b[1;31mIndentationError\u001b[0m\u001b[1;31m:\u001b[0m expected an indented block\n"
     ]
    }
   ],
   "source": [
    "userl = \"DIO\"\n",
    "passwordl = \"123456\"\n",
    "\n",
    "for i in range(3,0,-1):\n",
    "\n",
    "username = input(\"账号:\")\n",
    "password = input(\"密码:\")\n",
    " \n",
    "if userl == username and passwordl == passwordl\n",
    "    print(\"欢迎\"+userl\"登录！\")\n",
    "    break\n",
    "else:\n",
    "    print(\"账号不存在或者密码不正确\")\n",
    "    print(\"您还有\"+(i-1)+\"次尝试机会\")\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5c1a1090",
   "metadata": {},
   "outputs": [],
   "source": [
    "name = input(\"姓名:\")\n",
    "age = input(\"年龄：\")\n",
    "job = input(\"工作：\")\n",
    "salary = input(\"收入：\")\n",
    "reg = input(\"地区：\")\n",
    "\n",
    "info = '''-----INFO OF {姓名}-----\n",
    "姓名：{姓名}\n",
    "年龄：{年龄}\n",
    "工作：{工作}\n",
    "收入：{收入}\n",
    "地区：{地区}'''(name,age,job,salary,reg)\n",
    "print(info)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "58bb38c1",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
